target-triple 0.1.3

TARGET and HOST triples
Documentation

Rustc target triple

Access the $TARGET and $HOST rustc target triples that Cargo supplies to build scripts.

Example

fn main() {
    // As a const &str:
    assert_eq!(target_triple::TARGET, "x86_64-unknown-linux-gnu");

    // As a string literal:
    assert_eq!(
        concat!("target/", target_triple::target!()),
        "target/x86_64-unknown-linux-gnu",
    );
}

License